/*
 * @Author: your name
 * @Date: 2021-06-26 09:52:33
 * @LastEditTime: 2021-06-26 10:17:40
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \6.26作业\yyds\router\index.js
 */
const fs=require("fs")

module.exports=(app)=>{
    fs.readdir(__dirname,(err,files)=>{
        files.forEach(item=>{
            if(item==="string")return;
            const router=require(`./${item}`)
            app.use(router.routes())
        })
    })
}